#include "cbus.h"
#include "stdio.h"

void print(CBus* cbus) {
	printf("x=%d\n", cbus->x);
	printf("y=%d\n", cbus->y);
	printf("z=%d\n", cbus->z);
	printf("f=%d\n", cbus->f);
}

void wait(char key) {
	char val = 0;
	while (key != val) {
		scanf("%c", &val);
	}
}

void main() {
	CBus cbus;
	U8 cbuf[10] = {0};
	cbus.x = 10;
	cbus.y = 20;
	cbus.z = 30;
	cbus.f = 40;
	CBus_PackUp(&cbus, cbuf);
	CBus_Unpack(&cbus, cbuf);
	print(&cbus);
	wait(' ');
}